package com.wmada.springdemo;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author will.ma
 * @date 2020-2-2
 */
@Component
@ConfigurationProperties(prefix = "com.wmada")
public class MainConfig {

    @Value("${com.wmada.system-name}")
    private String systemName;
    @Value("${com.wmada.system-version}")
    private String systemVersion;

    public String getSystemName() {
        return systemName;
    }

    public String getSystemVersion() {
        return systemVersion;
    }

    public String getFullName() {
        return systemName + " v" + systemVersion;
    }
}
